import React from 'react';
import Loadable from 'react-loadable';
import { homeListThunk,detailShowThunk } from '../../store/actions/thunk';

const Loading=(props)=>{
	return <div>Loading...</div>
};
const LoadableDetail = Loadable({
	loader: () =>import(/* webpackChunkName: 'Detail' */'../../containers/Detail/index'),
	loading: Loading,
});

const LoadableHome = Loadable({
	loader:() => import(/* webpackChunkName: 'Home' */ '../../containers/Home/index'),
	loading: Loading,
});

const routesConfig=[{
	path: '/',
	exact: true,
	component: LoadableHome,
	thunk: homeListThunk,
}, {
	path: '/detail/:id',
	exact: true,
	component: LoadableDetail,
	thunk: detailShowThunk,
}];

export default routesConfig;




